/*
 * @Author: Guiter 1336263157@qq.com
 * @Date: 2023-11-29 20:04:47
 * @LastEditors: Guiter 1336263157@qq.com
 * @LastEditTime: 2023-11-29 20:05:25
 * @FilePath: \nuxt3-music-player\src\server\api\music.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { http } from '~/server';
import type { MusicUrl } from '~/types/music';

/**
 * 获取用户信息，歌单，收藏，mv,dj数量
 * @returns
 */
export async function getMusicUrl(id: number): Promise<{ code: number; data: MusicUrl[] }> {
  return await http.get<{ code: number; data: MusicUrl[] }>('/song/url', {
    id
  });
}
